improving code to ignore swp files more clearly